/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package collection;

import dto.Order;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author duonghung1369
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "orders")
public class Orders implements Serializable {

    @XmlElement(name = "order", required = true)
    private List<Order> orders;

    public Orders() {
    }

    public Orders(List<Order> orders) {
        if (orders == null) {
            orders = new ArrayList<Order>();
        } else {
            this.orders = orders;
        }
    }

    public List<Order> getOrders() {
        if (orders == null) {
            orders = new ArrayList<Order>();
        }
        return orders;
    }
}
